<template>
    <div>
        后台管理
        {{ url }}
        <el-button size="large" @click="handleApi">El Message</el-button>
        <el-button size="large" @click="handleRoute">页面渲染</el-button>
    </div>
</template>

<script setup lang="ts">
import { inject } from 'vue';
import { useRouter } from 'vue-router';

const api:Function|undefined = inject("$api");
const url = import.meta.env.VITE_API_URL;

const handleApi = () => {
    console.log(api)
    api&&api("user/login")
}

const router = useRouter();
const handleRoute = () => {
    console.log(router)
    router.push({path: "/label/9999"});
}


</script>

<style lang="scss" scoped>
</style>